package dao

import (
	"server_cluster/http/model"
)

func (d *Dao) GetGmInfoByToken(token string) (*model.DbGmAccount, error) {
	var gmInfo model.DbGmAccount
	err := d.db.Where("token = ?", token).First(&gmInfo).Error

	if err != nil {
		return nil, err
	}
	return &gmInfo, nil
}
